<?php

	namespace Phptricks;

//echo \microtime(true) . "<br>";
	/**
	 * Description of Phptricks
	 * Phptricks Framework 
	 * link http://phptricks.net/Framework
	 * date start 2014
	 * @author Abd Elfttah Ahmed <phptricks.net@gmail.com>
	 */
	include('system/library/PhptricksExceptions/PhptricksExceptions.php');
	use Phptricks\system\library\PhptricksExceptions\PhptricksExceptions as Exc;
include('system/config/global.php');
	include('system/core/library/library.php');
	include('system/library/loader/loader.php');
	use Phptricks\system\library\loaders\loader as loaders;
	use Phptricks\system\library\bootstrap\bootstrap as bootstrap;
try {
		$Exceptions = new \Phptricks\system\library\PhptricksExceptions\PhptricksExceptions();
		$loader = loaders::getinstance();
//	$loader->view_load_files = true;
		$loader->setpath(array(
			'config' => array(
				APPPATH . 'config/',
				SYSTEMPATH . 'config/',
			),
			'controllers' => array(
				APPPATH . 'controllers/',
			),
			'language' => array(
				APPPATH . 'language/',
				SYSTEMPATH . 'language/',
			),
			'library' => array(
				APPPATH . 'library/',
				SYSTEMPATH . 'library/',
			),
			'models' => array(
				APPPATH . 'models/',
			),
			'view' => array(
				APPPATH . 'view/',
			),
		));

		$bootstrap = new bootstrap();
		$Exceptions->error_list();
	} catch (\Exception $error) {
		throw new Exc($error->getMessage());
	}
//	$inc = \get_included_files();
//	\sort($inc);
//	\pr($inc);
//echo \microtime(true) . "<br>";